﻿using System;
using System.ComponentModel.Composition;
using System.Linq;
using System.Linq.Expressions;
using ASPItalia.ModelVirtualCasting.Common;
using ASPItalia.ModelVirtualCasting.ObjectModel;
using ASPItalia.ModelVirtualCasting.Parts;

namespace ASPItalia.ModelVirtualCasting.Fake
{
    [Export("UserRepository", typeof(IUserRepository))]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    [RepositoryMetadata(Name = "UserRepository", IsFake = true)]
    public class UserRepository : BaseRepository<IUserRepository>, IUserRepository
    {
        public User GetByUsername(string username)
        {
            return null;
        }

        public void InsertOnSubmit(User entity)
        {
        }

        public void Update(User entity)
        {
        }

        public void DeleteOnSubmit(User entity)
        {
        }

        public void SubmitChanges()
        {
        }

        IQueryable<User> IReadOnlyRepository<IUserRepository, User>.GetAll()
        {
            return null;
        }

        public IQueryable<User> Where(Expression<Func<User, bool>> predicate)
        {
            return null;
        }

        public long Count(Expression<Func<User, bool>> predicate)
        {
            return 0L;
        }

        IUserRepository IReadOnlyRepository<IUserRepository, User>.EnableLazyLoading()
        {
            return this;
        }

        IUserRepository IReadOnlyRepository<IUserRepository, User>.DisableLazyLoading()
        {
            return this;
        }

        public IUserRepository Include(string path)
        {
            return this;
        }

				public IUserRepository Include<TProperty>(Expression<Func<User, TProperty>> path)
				{
					return this;
				}

				public IUserRepository CreateQuery()
				{
					return this;
				}

				public IUserRepository DoNotTrack()
				{
					return this;
				}
		}
}
